{template "topic_header"}

<div class="c_icon"></div>
<div class="main">
<!--左侧-->
    <div class="main_left">
 	<!--{if $is_allowed}-->
	<!--{if MEMBER_ROLE_TYPE != 'admin'}-->
		<div class="qun_tips_2">
			您当前等级可以创建{$detail['ploy_qnum']}个微群,
			<!--{if $detail['my_qnum']}-->
				您已经创建了{$detail['my_qnum']}个微群,还可以创建{$detail['allow_create_num']}个
			<!--{else}-->
				您还没有创建微群呢。赶快创建吧！
			<!--{/if}-->
		</div>
	<!--{/if}-->
    	<div class="group_new_title"><h2>创建微群</h2> ( 您目前还能创建3个微群 ) </div>
        <div class="group_new">
<form method="post" action="index.php?mod=qun&code=docreate" autocomplete="off" id="qun_form" enctype="multipart/form-data" >
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="60">微群名称：</td>
    <td><input type="text" name="qun_name" id="textfield" class="group_input" /></td>
  </tr>
  <tr>
	<td><label for="color-background">微群分类：</label></td>
	<td>
		<div style="float:left; margin-right:10px;">
			<select id="top_cat" name="top_cat" onchange="get_catselect(this)" style="border:1px solid #cfcfcf;padding:1px;">
				{$catselect['first']}
			</select>
		</div>
		<div style="float:left;display:none; ">
			<select id="sub_cat" name="sub_cat" style="border:1px solid #cfcfcf;padding:1px;">
				{$catselect['second']}
			</select>
		</div>
	</td>
  </tr>
  <tr>
	<td><label for="color-background">微群标签：</label></td>
	<td>
		<input id="tag" name="tag" value="" type="text" class="group_input" >
		<span style="margin-left:10px;">可以使用空格或英文逗号分隔，最多可填写5个标签</span>
	</td>
	
  </tr>
  <tr>
    <td>微群介绍：</td>
    <td><textarea cols="" rows="3" class="group_textarea" name="desc"></textarea></td>
  </tr>
  <tr>
	<td><label for="color-background">微群类型：</label></td>
	<td>
		<input type="radio" value="0" name="join_type" id="privacy_open" {$checked['join_type'][0]} onclick="privacy_radio_force(2)" />
		<label for="privacy_open">公开群组</label>
		<br />
		<input type="radio" value="1" name="join_type" id="privacy_closed" {$checked['join_type'][1]}/>
		<label for="privacy_closed">私密群组</label>	
	</td>
  </tr>
  <tr>
    <td>所在地：</td>
	<td>
		<div style="width:100px; float:left;">
		<select id="province" name="province" style="border:1px solid #cfcfcf;padding:1px;">
			{$member[province]}
		</select>
		</div>
		<div style="width:100px;float:left; ">
		<select id="city" name="city"></select style="border:1px solid #cfcfcf;padding:1px;">
		</div>
	</td>
  </tr>
  <tr>
    <td>微群头像：</td>
    <td class="group_hand"><img src="images/group_new.gif" width="161" height="161" />
    <span>你还没有上传头像<br />
      支持JPG、GIF、PNG图片文件，且小于5M
          <input type="file" name="icon" id="button" value="浏览" class="group_button" /></span></td>
  </tr>
  <tr>
    <td valign="top">加群方式：</td>
    <td>
    	<label for="f01" class="group_label"><input type="radio" name="group_new" id="f01" />自由加入</label><br />
    	<label for="f02" class="group_label"><input type="radio" name="group_new" id="f02" />需要身份验证才能加入</label><br />
    	<label for="f03" class="group_label"><input type="radio" name="group_new" id="f03" />只能由管理员邀请加入</label>
      </td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>
      <input type="submit" name="button2" id="button2" value="创建微群" class="group_button" />
    	<a href="index.php?mod=qun">取消</a>
    </td>
  </tr>
</table>
</form>
        </div>
		
<!--{else}-->
<div class="qun_tips_2">
	<!--{if $detail['no_avatar']}-->
		系统要求上传了头像才能创建微群，请先上传你的头像吧&nbsp;&nbsp;<a href="index.php?mod=settings&code=face" target="_blank">立刻去上传</a>
	<!--{elseif $detail['my_qnum'] > 0 && $detail['my_qnum'] ==  $detail['ploy_qnum']}-->
		你已经达到了你可以创建群的上限了。
	<!--{elseif $detail['little_fans']}-->
		你当前拥有{$detail['my_fans_count']}个粉丝，系统策略要求最少拥有{$detail['ploy_fans_count']}个粉丝才能创建群
	<!--{elseif $detail['little_topic']}-->
		你当前拥有{$detail['my_topic_count']}条微博，系统策略要求最少拥有{$detail['ploy_topic_count']}条微博才能创建群
	<!--{elseif $detail['sys_not_allow']}-->
		系统禁止普通用户创建微群
	<!--{/if}-->
	<br /> <a href="index.php?mod=topic&code=myhome">返回我的首页</a> <span style="color:#444">|</span> <a href="index.php?mod=qun">返回微群首页</a>
	</div>
<!--{/if}-->
		
		
    </div>

<!--右边栏目 Begin-->
{subtemplate qun/qun_right}
<!--右边栏目 End-->

 
<!--{if $this->Config[ad_enable]}-->
<div align="center" class="T_AD"> {$this->Config[ad][ad_list][qun][footer]} </div>
<!--{/if}-->
<script type="text/javascript" src="js/city.js"></script>
<script type="text/javascript">
	$(document).ready(function(){
	var selectOption={eval load::functions('area');echo area_config_to_json();};
	
	$("#province").doubleSelect('city',selectOption,{preselectFirst:'{$member[province]}',preselectSecond:'{$member[city]}'});
	});
</script>
{template "topic_footer"}